
function romotes($scope, $http) {
    $http({
        method: 'GET',
        url: '/Tremain/ng/findRemote',
        params: {
            page : 2,
            rows : 20

        }
    }).then(function (res) {
        if (res.data.flag == 1) {
            $scope.remoteList = res.data.content.list;
        } else {
            window.alert('error');
        }
    }, function (err){
        if (true) {

        } else {
        }
    });
}

var app = angular.module('app_test_table', ['bw.paging']);
app.controller('romotes_', function($scope, $http) {
    $http({
        method: 'GET',
        url: '/Tremain/ng/findRemote',
        params: {
            page : $scope.pageNum,
            rows : 20
        }
    }).then(function (res) {
        if (res.data.flag == 1) {
            $scope.remoteList = res.data.content.list;
            $scope.my_pageSize = res.data.content.pageSize;
            $scope.mytotal = res.data.content.total;
            $scope.pageNum = res.data.content.pageNum;
        } else {
            window.alert('error');
        }
    }, function (err){
        if (true) {
        } else {
        }
    });
    
    $scope.GotoPage = function (page, rows) {
        $http({
            method: 'GET',
            url: '/Tremain/ng/findRemote',
            params: {
                page : page,
                rows : rows
            }
        }).then(function (res) {
            if (res.data.flag == 1) {
                $scope.remoteList = res.data.content.list;
                $scope.my_pageSize = res.data.content.pageSize;
                $scope.mytotal = res.data.content.total;
                $scope.pageNum = res.data.content.pageNum;
            } else {
                window.alert('error');
            }
        }, function (err){
            if (true) {
            } else {
            }
        });
    }

});









